#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

#define EXCHANGE(n) ((((n)&0x55555555)<<1)+(((n)&0xaaaaaaaa)>>1))

int main()
{
	printf("%d\n", EXCHANGE(10));
	printf("%d\n", EXCHANGE(5));
	printf("%d\n", EXCHANGE(8));
	printf("%d\n", EXCHANGE(123));
	return 0;
}